#pragma once

#include <vector>


// Una implementacion del polinomio de Berntein
class BernsteinPol {
public:
	void init(unsigned int grado);
	double eval(double u, unsigned int k) const;

private:
	unsigned int m_grado;
	std::vector< double > m_coefComb;

	double evalPartePolinomial(double u, unsigned int n, unsigned int k) const;
	double combinatoria(unsigned int n, unsigned int k) const;
};

